<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrderFilmTicketsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order_film_tickets', function (Blueprint $table) {
            $table->increments('id');
            $table->string('order_code',20);
            $table->string('cinema_code',20);
            $table->string('seat_code',20);
            $table->string('row_num',20);
            $table->string('column_num',20);
            $table->integer('x_coord');
            $table->integer('y_coord');
            $table->integer('group_code');
            $table->integer('from');
            $table->string('film_ticket_code',20);
            $table->string('film_ticket_information',255)->nullable();
            $table->integer('pay_status')->default(2);
            $table->timestamp('pay_time')->nullable();
            $table->integer('print_status')->default(2);
            $table->timestamp('print_time')->nullable();
            $table->integer('refund_status')->default(2);
            $table->timestamp('refund_time')->nullable();
            $table->integer('price')->nullable();
            $table->integer('service')->nullable();
            $table->integer('lowest_price');
            $table->integer('status')->default(1);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order_film_tickets');
    }
}
